{extend name="Public:base" /}
   
{block name="body"}
<div class="page " id="loginhtml" style="background:#fff;">
<style>
.aui-list {
    border: none;
    background-size: 100% 0px;
    }
    input:-webkit-autofill { 
-webkit-box-shadow: 0 0 0px 1000px white inset; 

height: 27px!important; 
line-height: 27px!important; 
border-radius: 0 4px 4px 0; 
} 
</style>
<header class="aui-bar  aui-bar-nav aui-border-b  aui-bar-light" id="header">

   <a class="aui-pull-left aui-btn aui-text-warning back" href="{:es_url('Wap/index')}"   id="zuoce">
        <span class="icon  icon-xiangzuojiantou "></span>
    </a>
    <div class="aui-title" id="headername" style="color:#000;">登录</div>
  

</header>

    <div class="aui-content " style="margin: 10px;">
        <ul class="aui-list aui-form-list ">
           
            <li class="aui-list-item">
                <div class="aui-list-item-inner">
                    <div class="aui-list-item-label-icon">
                        <i class="icon icon-wodezhanghao1"></i>
                    </div>
                    <div class="aui-list-item-input">
                        <input type="text" id="username" placeholder="请输入用户名">
                    </div>
                </div>
            </li>
          
            <li class="aui-list-item">
                <div class="aui-list-item-inner">
                    <div class="aui-list-item-label-icon">
                        <i class="icon icon-suo"></i>
                    </div>
                    <div class="aui-list-item-input">
                        <input type="password" placeholder="请输入密码" id="password">
                    </div>
                    <div class="aui-list-item-label-icon" onclick="showPassword('password',this);">
                        <i class="icon icon-biyan" id="passwordicon"></i>
                    </div>
                </div>
                
            </li>
         
        </ul>
    </div>

        
 
   

    
    
<div class="aui-content-padded">
<div class="aui-btn aui-btn-danger  aui-btn-block"  onclick="userlogin()">登录</div>
</div>


<script>
// 触发自定义alert事件

function userlogin(){

var username=$('#username').val();
var password = $('#password').val();

    
   if (password==''||username=='') {
         
         $.toast('请将信息填写完整后登录');
   
        return;
    }

   var bodyParam = {
        username:username,
        password:password,
    }
   var url="{:es_url('Wap/loginHandle')}";
  
  
   
   
   $.post(url, bodyParam, function(ret){

 if (ret.code==0) {

	 $.toast(ret.msg);

}else{
	  $.toast('登录成功');
	 
	  $.router.loadPage("{:es_url('Wap/index')}", true);
 }

   
   
   });


}

    
</script>
  </div>
 {/block}